<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, viewport-fit=cover" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      .box {
        position: relative;
        height: 200px;
        background-color: yellowgreen;
        /* border-bottom: 1px solid #000; */
      }

      .box::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: #000;
      }

      /* >=2  */
      @media (-webkit-min-device-pixel-ratio: 2) {
        /* .box {
          border-bottom: 0.5px solid #000;
        } */
        .box::after {
          /* height: 0.5px; */
          transform: scaleY(0.5);
        }
      }

      /* >=3 */
      @media (-webkit-min-device-pixel-ratio: 3) {
        /* .box {
          border-bottom: 0.333333px solid #000;
        } */
        .box::after {
          /* height: 0.333333px; */
          transform: scaleY(0.33333);
        }
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
  </body>
</html>
